import { Inject, Controller, Get, Query } from '@midwayjs/decorator';
import { Context } from '@midwayjs/koa';
import { NovelService } from 'src/service/novel.service';

@Controller('/user')
export class APIController {
  @Inject()
  ctx: Context;

  @Inject()
  NovelService: NovelService;

  @Get('/get_user')
  async getUser(@Query('uid') uid) {
    const user = await this.NovelService.getNovel({ id:1 });
    return { success: true, message: 'OK', data: user };
 
  }
}
